package com.example.qxfw.ybzz.service;

import com.example.qxfw.common.entity.qx.MsgMediumSmallScale;
import com.example.qxfw.common.entity.xt.ContourSetting;
import com.example.qxfw.qxxx.dto.MsgdiumSmallScalDto;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.Date;
import java.util.List;

public interface MsgMediumSmallScaleService {
    /**
     * 获取平均值
     *
     * @param element
     * @param observTime1
     * @param observTime2
     * @return
     */
    List<MsgMediumSmallScale> listAvgByElement(String element, String observTime1, String observTime2);

    /**
     * 获取实况值
     *
     * @param timespan
     * @param param1
     * @param param2
     * @param forecastType
     * @return
     */
    List<MsgMediumSmallScale> getList(String timespan, String param1, String param2, String forecastType);

    /**
     * 获取实况值
     *
     * @return
     */
    List<MsgMediumSmallScale> getList();

    /**
     * 获取数据
     *
     * @param observTime
     * @param stationId
     * @return
     */
    List<MsgMediumSmallScale> getList18(Timestamp observTime, String stationId);

    /**
     * 旬查询获取数据
     *
     * @param time1
     * @param time2
     * @param stationId
     * @return
     */
    List<MsgMediumSmallScale> getList19(String time1, String time2, String stationId);

    /**
     * 获取数据
     *
     * @param time1
     * @param time2
     * @param stationId
     * @return
     */
    List<MsgMediumSmallScale> getList1(String time1, String time2, String stationId);

    /**
     * 按日统计查询数据
     *
     * @param type
     * @param en
     * @param start
     * @param end
     * @return
     */
    List<MsgMediumSmallScale> getList2(String type, String en, String start, String end);

    /**
     * 单时段查询全部
     *
     * @param observTime
     * @param county
     * @return
     */
    List<MsgMediumSmallScale> getList3(String observTime, String county);

    /**
     * 单时段查询
     *
     * @param observTime
     * @param stationID
     * @return
     */
    List<MsgMediumSmallScale> getList4(String observTime, String stationID);

    /**
     * 多时段查询全部
     *
     * @param observTime1
     * @param observTime2
     * @param county
     * @return
     */
    List<MsgMediumSmallScale> getList5(String observTime1, String observTime2, String county);

    /**
     * 多时段查询
     *
     * @param observTime1
     * @param observTime2
     * @param stationId
     * @return
     */
    List<MsgMediumSmallScale> getList6(String observTime1, String observTime2, String stationId);

    List<MsgMediumSmallScale> getList7(String time, String stationId);

    Integer update(MsgMediumSmallScale msgMediumSmallScale);

    List<String> getMaxTemp(String time1, String time2, String stationId);

    List<String> getMaxTemp1(String time1, String time2, String stationId);

    List<String> getMaxTemp2(String time, String stationId);

    List<String> getRain(String time1, String time2, String stationId);

    List<String> getRain1(String time1, String time2, String stationId);

    List<String> getRain2(String time1, String time2, String stationId);

    List<String> getTemp(String time1, String time2, String stationId);

    List<String> getWindVelocity(String time1, String time2, String stationId);

    List<String> getMaxTemp3(String time, String stationId);


    List<String> getMinTemp(String time1, String time2, String stationId);

    String getMinTemp1(String time, String stationId);

    List<MsgMediumSmallScale> getMaxWind(String time, String stationId);

    List<MsgMediumSmallScale> getSumValue(String stationId, String time);

    List<MsgMediumSmallScale> getList8(String date1, String date2, String dbName);

    List<MsgMediumSmallScale> getList9(String date1, String date2, String dbName);

    String getMaxTime();

    /**
     * 多要素查询1
     *
     * @param observTime
     * @param city
     * @param sort
     * @return
     */
    List<MsgMediumSmallScale> getList10(String observTime, String city, String staCondition, String sort);

    /**
     * 多要素查询2
     *
     * @param observTime
     * @param city
     * @param strCitys
     * @param sort
     * @return
     */
    List<MsgMediumSmallScale> getList11(String observTime, String city, String strCitys, String staCondition, String sort);

    /**
     * 单时段查询1
     *
     * @param m_strSelDbName1
     * @param sortColumn
     * @param observTime
     * @param strCitys
     * @param staCondition
     * @param sort
     * @return
     */
    List<MsgMediumSmallScale> getList12(String m_strSelDbName1, String sortColumn, String observTime, String strCitys, String staCondition, String sort);

    /**
     * 单时段查询2
     *
     * @param m_strSelDbName1
     * @param sortColumn
     * @param observTime
     * @param staCondition
     * @param sort
     * @return
     */
    List<MsgMediumSmallScale> getList13(String m_strSelDbName1, String sortColumn, String observTime, String staCondition, String sort);

    /**
     * 单时段查询3
     *
     * @param observTime
     * @param strCitys
     * @param staCondition
     * @param sort
     * @return
     */
    List<MsgMediumSmallScale> getList14(String observTime, String strCitys, String staCondition, String sort);

    /**
     * 单时段查询4
     *
     * @param observTime
     * @param staCondition
     * @param sort
     * @return
     */
    List<MsgMediumSmallScale> getList15(String observTime, String staCondition, String sort);

    /**
     * 多时段查询1
     *
     * @param strSelElement
     * @param strSelWindD
     * @param pdtStart
     * @param pdtEnd
     * @param m_strSelDbName
     * @param strWindDElement
     * @param strwhere
     * @return
     */
    List<MsgMediumSmallScale> getList16(String strSelElement, String strSelWindD, String pdtStart, String pdtEnd, String m_strSelDbName, String strWindDElement, String strwhere);

    /**
     * 多时段查询2
     *
     * @param strSelElement
     * @param pdtStart
     * @param pdtEnd
     * @param m_strSelDbName
     * @param strwhere
     * @return
     */
    List<MsgMediumSmallScale> getList17(String strSelElement, String pdtStart, String pdtEnd, String m_strSelDbName, String strwhere);

    List<MsgMediumSmallScale> listAvgByDbName(String dbName, Timestamp time1, Timestamp time2);

    List<MsgMediumSmallScale> listMaxByDbName(String dbName, Timestamp time1, Timestamp time2);

    List<MsgMediumSmallScale> listMinByDbName(String dbName, Timestamp time1, Timestamp time2);

    List<MsgMediumSmallScale> listSumByDbName(String dbName, Timestamp time1, Timestamp time2);

    List<MsgMediumSmallScale> listMaxByDbName1(String dbName, Timestamp time1, Timestamp time2);

    List<MsgMediumSmallScale> listAvgByDbName1(String dbName, Timestamp time1, Timestamp time2);

    /**
     * 查询实况平均数据
     *
     * @param dbName
     * @param time1
     * @param time2
     * @param lon
     * @param lat
     * @param radius
     * @param pos
     * @return
     */
    List<MsgMediumSmallScale> listSkAvg(String dbName, String time1, String time2, double lon, double lat, double radius, List<List<Double>> pos);

    /**
     * 查询实况最大数据
     *
     * @param dbName
     * @param time1
     * @param time2
     * @param lon
     * @param lat
     * @param radius
     * @param pos
     * @return
     */
    List<MsgMediumSmallScale> listSkMax(String dbName, String time1, String time2, double lon, double lat, double radius, List<List<Double>> pos);

    /**
     * 查询实况最小数据
     *
     * @param dbName
     * @param time1
     * @param time2
     * @param lon
     * @param lat
     * @param radius
     * @param pos
     * @return
     */
    List<MsgMediumSmallScale> listSkMin(String dbName, String time1, String time2, double lon, double lat, double radius, List<List<Double>> pos);

    /**
     * 查询实况求和数据
     *
     * @param dbName
     * @param time1
     * @param time2
     * @param lon
     * @param lat
     * @param radius
     * @param pos
     * @return
     */
    List<MsgMediumSmallScale> listSkSum(String dbName, String time1, String time2, double lon, double lat, double radius, List<List<Double>> pos);

    /**
     * 查询实况最大数据1
     *
     * @param dbName
     * @param time1
     * @param time2
     * @param lon
     * @param lat
     * @param radius
     * @param pos
     * @return
     */
    List<MsgMediumSmallScale> listSkMax1(String dbName, String time1, String time2, double lon, double lat, double radius, List<List<Double>> pos);

    List<MsgMediumSmallScale> getList26(String observTime1, String observTime2, String stationId, String element);


    List<MsgMediumSmallScale> getSumRain(String obserTime1, String observTime2, String city);

    List<MsgMediumSmallScale> listByParam(String observTime1, String observTime2, String stationId);

    /**
     * 获取时间段内，最低最高温度
     *
     * @param observTime1
     * @param observTime2
     * @param stationId
     * @return
     */
    MsgMediumSmallScale selectMaxMinTempByParam(String observTime1, String observTime2, String stationId);

    /**
     * 获取时间段内，雨量合计
     *
     * @param observTime1
     * @param observTime2
     * @param stationId
     * @return
     */
    MsgMediumSmallScale selectSumRainByParam(String observTime1, String observTime2, String stationId);

    /**
     * 获取县区内的所有站点
     *
     * @param county 县区
     * @return
     */
    List<MsgMediumSmallScale> selectStationNameByCounty(String county);

    /**
     * 根据不同条件查询自动站信息
     *
     * @param startTime 开始时间
     * @param endTime   结束时间
     * @param condition 查询条件（如：风速、温度、湿度等）
     * @param area      地点（如：国家站，自动站，0表示不查，1表查）
     * @param num       根据情况查最大值或最小值（2：表示查询最大值，1：表示查询最小值，0：放弃这个查询条件）
     * @return
     */
    List<MsgMediumSmallScale> getDifferentConditionsOfmsgmediumsmallscale(String startTime, String endTime, String condition, String area[], Integer num);

    List<MsgMediumSmallScale> multiFactorSearchRiver(String startTime, String endTime, String station);


    //该时间段的平均温度
    List<MsgMediumSmallScale> selectAvgTemp(Timestamp startTime, Timestamp endTime);

    //该时间段的最高温度
    List<MsgMediumSmallScale> selectMaxTemp(Timestamp startTime, Timestamp endTime);

    //该时间段的最低温度
    List<MsgMediumSmallScale> selectMinTemp(Timestamp startTime, Timestamp endTime);

    //整点温度
    List<MsgMediumSmallScale> selectHourlyTemperature(Timestamp time);

    //整点风
    List<MsgMediumSmallScale> selectHourlyWind(Timestamp time);

    //极大风
    List<MsgMediumSmallScale> selectExtremeWinds(Timestamp startTime, Timestamp endTime);

    //整点湿度
    List<MsgMediumSmallScale> selectHourlyHumidity(Timestamp startTime);

    //最小湿度
    List<MsgMediumSmallScale> selectMinimumHumidity(Timestamp startTime, Timestamp endTime);

    //整点气压
    List<MsgMediumSmallScale> selectHourlyAirPressure(Timestamp startTime);

    //最小气压
    List<MsgMediumSmallScale> selectAverageAirPressure(Timestamp startTime, Timestamp endTime);

    //整点雨量
    List<MsgMediumSmallScale> selectHourlyRain(Timestamp startTime);
    //累积雨量
    List<MsgMediumSmallScale> selectCumulativeRainfall(Timestamp startTime, @Param("endTime") Timestamp endTime);

    List<MsgMediumSmallScale> selectStatisticalChartOfAgriculturalStationElements(String stationName, Timestamp startTime,Timestamp endTime,String column);

    List<ContourSetting> getContourSetting(String type);

    Float selectAvgRain(Timestamp startTime, Timestamp endTime);

     Float selectMaxRain(Timestamp startTime, Timestamp endTime);



    String selectMaxStation(Timestamp startTime, Timestamp endTime);

    Object createProduct(int year, String startTime, String endTime, String userName, String productName, String productType, Date parse);



}
